<template>
  <div class="dog">
      <h1 @click.prevent="addLove">{{ name }}</h1>
      <img :src="picAddress" />
  </div>
</template>
<script>
export default {
  props: ['picAddress', 'name'],
  methods: {
    addLove () {
      // console.log(this.name)
      this.$emit('AddLoves', this.name)
    }
  }
}
</script>

<style lang="less" scoped>
.dog {
  width: 200px;
  border: 1px solid black;
  text-align: center;
  float: left;
}
.dog img {
  width: 100%;
  height: 200px;
}
</style>
